x86/PV: use 64-bit subtract to adjust guest RIP upon missing SYSCALL callbacks
authorJan Beulich <JBeulich@suse.com>
Wed, 27 Jan 2021 07:47:13 +0000 (08:47 +0100)
committerJan Beulich <jbeulich@suse.com>
Wed, 27 Jan 2021 07:47:13 +0000 (08:47 +0100)
commit464301737acfa90b46b79659b19d7f456861def3
treeddde1832cc3b4292dbeb2d7288e23df0cb465393
parent65f98b8c31d77d73a86c33daa33980a01daad88c
x86/PV: use 64-bit subtract to adjust guest RIP upon missing SYSCALL callbacks

When discussing the shrunk down version of the commit in question it
was said (in reply to my conditional choosing of the width):

"However, the 32bit case isn't actually interesting here.  A
 guest can't execute a SYSCALL instruction on/across the 4G->0 boundary
 because the M2P is mapped NX up to the 4G boundary, so we can never
 reach this point with %eip < 2.

 Therefore, the 64bit-only form is the appropriate one to use, which
 solves any question of cleverness, or potential decode stalls it
 causes."

Fixes: ca6fcf4321b3 ("x86/pv: Inject #UD for missing SYSCALL callbacks")
Signed-off-by: Jan Beulich <JBeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/x86_64/entry.S